<?xml version="1.0"?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:c="http://java.sun.com/jsp/jstl/core" version="2.1">
<jsp:directive.page import="es.ikex.pojo.Pdf"/>
	<jsp:directive.page contentType="text/html; charset=UTF-8" />
	<jsp:directive.page isELIgnored="false" />

<c:choose>
	<c:when test="${param.dest == 'new' }">
		<c:url var="destino" value="../jsp/registro.jsp" />
		<jsp:forward page="${destino}" />
	</c:when>
	
	<c:when test="${param.dest == 'perfil' }">
		<c:redirect url="${pageContext.request.pathInfo}/jsp/perfil.jsp" />
	</c:when>
	
	<c:when test="${param.dest == 'catalogo' }">
		<jsp:scriptlet>
			Pdf.getCatalogo(request, response);
		</jsp:scriptlet>
	</c:when>
	
	<c:when test="${param.dest == 'categoria' }">
		<c:url var="destino" value="../jsp/categoria.jsp">
			<c:param name="coleccion" value="${param.coleccion}" />
			<c:param name="categoria" value="${param.categoria}" />
		</c:url>
		<jsp:forward page="${destino}" />
	</c:when>
	
	<c:when test="${param.dest == 'politicaCookies' }">
		<jsp:forward page="${pageContext.request.pathInfo}/jsp/PoliticaDeCookies.jsp" />
	</c:when>
	
	<c:when test="${param.dest == 'contacto' }">
		<jsp:forward page="${pageContext.request.pathInfo}/jsp/Contacto.jsp" />
	</c:when>
	
	<c:when test="${param.dest == 'sobreNosotros' }">
		<jsp:forward page="${pageContext.request.pathInfo}/jsp/sobreNosotros.jsp" />
	</c:when>
	
	<c:when test="${param.dest == 'dondeEstamos' }">
		<jsp:forward page="${pageContext.request.pathInfo}/jsp/dondeEstamos.jsp" />
	</c:when>
	
	<c:when test="${param.dest == 'trabajaConNosotros' }">
		<jsp:forward page="${pageContext.request.pathInfo}/jsp/trabajaConNosotros.jsp" />
	</c:when>
	
	<c:when test="${param.dest == 'carrito' }">
		<c:redirect url="${pageContext.request.pathInfo}/jsp/carrito.jsp" />
	</c:when>
	
	<c:when test="${param.dest == 'pedidos' }">
		<c:redirect url="${pageContext.request.pathInfo}/Admin/pedidos.jsp" />
	</c:when>
	
	<c:when test="${param.dest == 'administradores' }">
		<c:redirect url="${pageContext.request.pathInfo}/Admin/SuperAdmin/administradores.jsp" />
	</c:when>
	
	<c:when test="${param.dest == 'slider' }">
		<c:redirect url="${pageContext.request.pathInfo}/Admin/slider.jsp" />
	</c:when>
	
	<c:when test="${param.dest == 'productos' }">
		<c:redirect url="${pageContext.request.pathInfo}/Admin/productos.jsp" />
	</c:when>
	
	<c:when test="${param.dest == 'editarProducto' }">
		<jsp:forward page="${pageContext.request.pathInfo}/Admin/edicionProducto.jsp" />
	</c:when>
	
	<c:when test="${param.dest == 'aniadirStock' }">
		<c:redirect url="${pageContext.request.pathInfo}/Admin/aniadirStock.jsp" />
	</c:when>
	
	<c:otherwise>
		<jsp:forward page="${pageContext.request.pathInfo}/jsp/index.jsp" />
	</c:otherwise>

</c:choose>
</jsp:root>